package com.kelvin.paopao.injector.modules;

import com.kelvin.paopao.adapter.MyOrderAdapter;
import com.kelvin.paopao.adapter.PeisongListAdapter;
import com.kelvin.paopao.injector.PerActivity;
import com.kelvin.paopao.injector.PerFragment;
import com.kelvin.paopao.module.peisong.list.IPeisongListPresenter;
import com.kelvin.paopao.module.peisong.list.PeisongListPresenter;
import com.kelvin.paopao.module.peisong.list.PeisonglistActivity;
import com.kelvin.paopao.module.peisong.mypeisong.myorder.MyOrderFragment;
import com.kelvin.paopao.module.peisong.mypeisong.myorder.MyOrderPresenter;

import dagger.Module;
import dagger.Provides;

/**
 * Created by MCK on 2017/5/23.
 */

@Module
public class MyOrderModule {
    private MyOrderFragment mView;

    public MyOrderModule(MyOrderFragment view) {
        this.mView = view;
    }

    @PerFragment
    @Provides
    public MyOrderPresenter providePresenter() {
        return new MyOrderPresenter(mView);
    }

    @PerFragment
    @Provides
    public MyOrderAdapter provideAdapter() {
        return new MyOrderAdapter(mView.getContext());
    }

}
